package com.grape.demo_graphql.resolver;

import com.grape.demo_graphql.entity.BankAccount;
import com.grape.demo_graphql.entity.Client;
import com.grape.demo_graphql.entity.Currency;
import graphql.kickstart.tools.GraphQLQueryResolver;
import lombok.extern.slf4j.Slf4j;
import lombok.var;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.UUID;

/**
 * @author jurassic
 */
@Slf4j
@Component
public class BankAccountResolver implements GraphQLQueryResolver {
    public BankAccount bankAccount(UUID id) {
        log.info("Retrieving bank account, id {}", id);

        BankAccount bankAccount = BankAccount.builder()
                .id(id)
                .currency(Currency.RMB)
                .build();
        return bankAccount;
    }
}
